<?
require 'global.php';

$gee=$article;
$cate=$article_category;
$faq=new DB(Tfaq,$conn);
$faq_cate=new DB(Tfaq_category,$conn);

$url='faq';
$do=isset($_GET["do"])?clean($_GET["do"]):'view'; // 备用字段
$id=0; if (isset($_GET["id"])) $id = clean($_GET["id"]);
$page=1; if(isset($_GET["page"]))if(is_numeric($_GET["page"]))$page=$_GET["page"];
$cateid=1; if(isset($_GET["cateid"]))if(is_numeric($_GET["cateid"]))$cateid=$_GET["cateid"];

// 分类树
$tem=$cate->get_rows(32,'','','seq_no');
$arr_cate=array();
foreach($tem as $val){ $arr_cate[$val['id']]=$val; }
$tem=$gee->get_rows(1024,'','','seq_no');
foreach($tem as $val){
	$arr_cate[$val['category_id']]['menu'][]=$val;
}

// faq 树
$arr_faq_cate=$faq_cate->get_rows(32,'','','seq_no');

// info
$tem=$faq->get_rows(1024,'','','seq_no');
$info=array();
foreach($tem as $val){
	$info[$val['category_id']][]=$val;
}
//pre($info);

$cate_name=WEB_FAQ;
// seo
$title=WEB_FAQ;
$kwd=$dpn=$title;

// view 加载视图
require VIEW.$url.'.php';

// end of file
